//cache缓存
import Cache from '@/config/cache.js'
//基础配置
import APP from '@/config/app.js'
class Login {
	//获取code
	getcode(data = '') {
		return new Promise((resolve, reject) => {
			var that = this;
			uni.login({
				provider: "weixin",
				success: function(res) {
					resolve(res.code);
				},
			});
		});

	}

	/**
	 * 微信登录
	 * 
	 */
	weixinglogin() {
		var that = this;
		uni.login({
			provider: "weixin",
			success: function(res) {
				that.getopenid(res.code);
			}
		});
	}
	/**
	 * 获取openid
	 * 
	 */
	async getopenid(code) {
		var that = this;
		var data = {};
		data['code'] = code;

	}

}
export default new Login;